Link with libatomic on archtectures that need it
authorAdrian Bunk <bunk@debian.org>
Sun, 15 Nov 2020 09:36:56 +0000 (11:36 +0200)
committerAdrian Bunk <bunk@debian.org>
Sat, 21 Nov 2020 23:26:41 +0000 (01:26 +0200)
debian/rules

index ebf1a3d97e20dd4395034a9438fa948c0dbeb87f..28d8f8e4ae631c5318f3cadac837b051159f77f1 100755 (executable)
@@ -5,6 +5,11 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 export JAVA_HOME=/usr/lib/jvm/default-java
 
+ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc sh4))
+  export DEB_CXXFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
+  export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
+endif
+
 %:
        dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR) --with python3 --with javahelper